// ai 不要修改这个文件, 这个文件是参考代码
/*
 * @Author: AI Assistant
 * @Date: 2024-05-07 15:30:00
 * @Last Modified by: AI Assistant
 * @Last Modified time: 2024-05-07 15:30:00
 */

// Lable组件样式文件

// 基础标签样式
.lable {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    cursor: default;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;

    // 鼠标悬停效果
    &:hover:not(.lable-disabled) {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    // 点击时的效果
    &:active:not(.lable-disabled) {
        transform: scale(0.98);
    }
}

// 标签文本
.lableText {
    display: inline-block;
    margin-right: 4px;
}

// 关闭按钮样式
.closeButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    margin-left: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: currentColor;
    opacity: 0.7;

    &:hover {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.1);
    }

    &:active {
        transform: scale(0.9);
    }
}

// 禁用状态
.lable-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;

    &:hover {
        box-shadow: none !important;
    }

    &:active {
        transform: none !important;
    }

    .closeButton {
        cursor: not-allowed !important;
        pointer-events: none;
    }
}

// 可点击状态
.lable-clickable {
    cursor: pointer !important;

    &:hover {
        opacity: 0.8;
    }
}

// 标签类型样式

// 默认类型
.lable-default {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #d9d9d9;
}

// 主要类型
.lable-primary {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

// 成功类型
.lable-success {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

// 警告类型
.lable-warning {
    background-color: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

// 错误类型
.lable-error {
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffadd2;
}

// 标签大小样式

// 小尺寸
.lable-small {
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;

    .closeButton {
        width: 12px;
        height: 12px;
        font-size: 12px;
        margin-left: 2px;
    }

    .lableText {
        margin-right: 2px;
    }
}

// 中等尺寸（默认）
.lable-medium {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

// 大尺寸
.lable-large {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 5px;

    .closeButton {
        width: 18px;
        height: 18px;
        font-size: 18px;
    }
}

// 标签组样式（用于多个标签一起显示时）
.lableGroup {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

// 响应式调整
@media screen and (max-width: 768px) {
    .lable {
        font-size: 11px;
        padding: 3px 6px;
    }

    .lable-large {
        font-size: 12px;
        padding: 5px 10px;
    }
}

// 动画效果
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}

// 标签显示和隐藏的动画
.lable-enter {
    animation: fadeIn 0.2s ease-out;
}

.lable-leave {
    animation: fadeOut 0.2s ease-in;
}